package com.bookstore.pojo;

import java.io.Serializable;

public class OrderItem implements Serializable {


    private Integer id;
    private String title;
    private int count;
    private double price;
    private double totalPrice;

    private String orderId;

    public OrderItem() {
    }

    public OrderItem(String title, int count, double price, double totalPrice, String orderId) {
        this.title = title;
        this.count = count;
        this.price = price;
        this.totalPrice = totalPrice;
        this.orderId = orderId;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double prince) {
        this.price = prince;
    }

    public double getTotalPrice() {
        return this.getPrice()*this.getPrice();
    }

    public void setTotalPrice(double totalPrice) {
        this.totalPrice = totalPrice;
    }

    public String getOrderId() {
        return orderId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    @Override
    public String toString() {
        return "OrderItem{" +
                "id=" + id +
                ", title='" + title + '\'' +
                ", count=" + count +
                ", prince=" + price +
                ", totalPrice=" + totalPrice +
                ", orderId='" + orderId + '\'' +
                '}';
    }
}